/*
* Copyright (C) 2020 ~ 2024 chaigec All Rights Reserved.
*
* Author:     chaigec <chaigec@163.com>
* Maintainer: chaigec <chaigec@163.com>

 * Use of this source code is governed by MIT license that can be found in the
 * LICENSE file in the root of the source tree. All contributing project authors
 * may be found in the AUTHORS file in the root of the source tree.
*/

#ifndef MK_EVENT_POOL_H
#define MK_EVENT_POOL_H
#include "MkUtil/MkTypes.h"

class CMkEvent;
class MkApi CMkEventPool
{
public:
    CMkEventPool();
    ~CMkEventPool();

    Uint32 Start(Uint32 nCount = 0);
    Uint32 Stop();
    CMkEvent* GetFreeEvent();
    BOOL IsRun() const { return m_bRun; }
    MkVector<CMkEvent*>& GetVecEvent() { return m_VecEvent; }
protected:
private:
private:
    BOOL                 m_bRun;
    MkVector<CMkEvent*>  m_VecEvent;
};

#endif
